function searchAttr(obj){
	$(obj).parents("p").find("a").removeClass("active");
	$(obj).addClass("active");

	var attr='';
	$("a[attr][class='active']").each(function(){
		attr+=$(this).attr("attr")+'-';
	})
	attr=attr.substring(0,attr.length-1);
	gid={$hd.get.gid}
	
	// 发送ajax请求库存的id,然后记录购物车
	$.post("{|U:'getStockId'}",{attr:attr,gid:gid},function(state){

	})
}